/*********************************************************************
 * Author: Benzi K. Ahamed
 *         www.benzi-ahamed.blogspot.com 
 * Date:   August 01 2007
 * 
 * Part of the Citrus framework
 * Copyright (C) 2007 - All rights reserved 
 * ********************************************************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Util
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class ImportFileAttribute : Attribute
    {
        #region Properties and fields
        /// <summary>
        /// The row delimiter
        /// </summary>
        private string _rowDelimiter;

        public string RowDelimiter
        {
            get { return _rowDelimiter; }
            set { _rowDelimiter = value; }
        }

        /// <summary>
        /// The type of file we are importing
        /// </summary>
        private ImportFileType _fileType;

        public ImportFileType FileType
        {
            get { return _fileType; }
            set { _fileType = value; }
        }

        /// <summary>
        /// The field delimiter
        /// </summary>
        private string _fieldDelimiter;

        public string FieldDelimiter
        {
            get { return _fieldDelimiter; }
            set { _fieldDelimiter = value; }
        }

        /// <summary>
        /// Indicates whether the first row is a header row
        /// </summary>
        private bool _hasFirstRowAsHeader;

        public bool HasFirstRowAsHeader
        {
            get { return _hasFirstRowAsHeader; }
            set { _hasFirstRowAsHeader = value; }
        }

        #endregion

        #region Ctor
        public ImportFileAttribute()
        {
            this._fieldDelimiter = ",";
            this._hasFirstRowAsHeader = false;
            this._rowDelimiter = "\n";
        }

        public ImportFileAttribute(ImportFileType fileType)
        {
            this._fileType = fileType;
        }
        #endregion

        #region Methods
        #endregion
    }
}
